from django.db import models
from libs.db import BaseModel
from libs.enums import PluginInstallState


class PluginInstallRecord(BaseModel):
    key = models.CharField('key', max_length=100)
    name = models.CharField('名称', max_length=100)
    git_url = models.CharField('git地址', max_length=1000)
    state = models.CharField('状态', max_length=30, choices=PluginInstallState.choices(), default=PluginInstallState.PENDING.value)

    class Meta:
        verbose_name = '插件扩展安装记录'
        verbose_name_plural = '插件扩展安装记录'
        ordering = ('-id',)
